#ifndef _LLE_H_
#define _LLE_H_

#include "PocoHeaders.h"
#include <vector>
#include <string>

#define MAX_SLLE_LENGTH 156

class DebugData
{
public:
    
};

class SPHYData
{
public:
    std::string           m_strUUID;
    int                   m_iTotal;
    int                   m_iCurIndex;
    std::string           m_strData;
    Poco::Clock::ClockVal m_clkInsert;
};

class SLLE : public Poco::Runnable
{
public:
    static SLLE* Initialize();
    static SLLE* GetInstance();

public:
    int Start();
    int Stop();

public:
    void write(std::string strSCSFUUID, std::string strMethod, std::string strData);
    std::string read();

private:
    SLLE();
    ~SLLE();
    virtual void run();
    void Routine();
    void ReadSPHYData();

private:
    int CheckSPHYData(SPHYData);
    void Debug0(SPHYData);

public:
    static std::string Int2String(int i);
    static int String2Int(std::string s);

private:
    static SLLE*                 m_pInstance;

private:
    Poco::Thread                 m_thread;
    bool                         m_bStop;
    Poco::Event                  m_ready;

private:
    Poco::Mutex                  m_mutexSLLEData;
    std::vector<std::string>     m_vectSLLEData;

private:
    Poco::Mutex                  m_mutexSPHYData;
    std::vector<SPHYData>        m_vectSPHYData;

private:
    std::map<std::string, int>           m_mapDebugUUID2Index;
};

#endif // !_LLE_H_
